﻿using Nx.Clients.Http;
using Nx.Logging;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Nx.Clients.Tests
{
    public class TestWebApiClient : WebApiClient, ITestWebApiClient
    {
        public TestWebApiClient(ILogFactory logFactory, ISerializer serializer)
            : base(logFactory, serializer, "http://localhost:8080/api/test")
        {
        }

        public async Task<IEnumerable<int>> ExecuteGet()
        {
            return await GetAsync<IEnumerable<int>>();
        }

        public async Task<string> ExecuteGetById(string id)
        {
            return await GetAsync<string>(string.Format("?id={0}", id));
        }

        //public async Task ExecutePOST()
        //{ 
        //    //return await PostAsync<string> 
        //}
    }
}
